package main

import (
	"fmt"
)

func main() {
	var n1 float64 = 10 / 4
	fmt.Println(n1) //2
	var n2 float64 = 10.0 / 4
	fmt.Println(n2) // 2.5

	fmt.Println(10 % 10) // 0

	var i int = 1
	i++ // 没有 ++i
	//i = i ++ ==错误，只能分开写
	var a int = i
	fmt.Println(a)

	// 交换两个变量值，不引用第三个变量
	var b int = 10
	var c int = 20
	b = b + c
	c = b - c // c = b+c-c ==>c=b
	b = b - c // b = b+c-b ==> b=c
	fmt.Println(c)
	fmt.Println(b)

}
